package com.practice.stream.entity;

import java.util.Arrays;
import java.util.List;

/**
 * @author hd
 * @date 2022/1/29 16:44
 */
public class TransactionList {
    private static List<Transaction> transactionList;

    public static List<Transaction> getTransactionList() {
        final Trader harry = new Trader("Harry", "Cambridge");
        final Trader tom = new Trader("Tom", "Milan");
        final Trader alan = new Trader("Alan", "Cambridge");
        final Trader clark = new Trader("Clark", "Berlin");

        transactionList = Arrays.asList(
                new Transaction(harry, 2011, 500.5),
                new Transaction(tom, 2015, 1200.6),
                new Transaction(alan, 2012, 998.0),
                new Transaction(clark, 2011, 1225.2)
        );
        return transactionList;

    }


}
